  <footer>
                        <hr>

                        
                      

                        <p>copyright  &copy ;河南方正智慧城市信息发展有限公司版权所有</p>
                    </footer>
                    
            </div>
        </div>
    </div>
    
  <div class="modal fade" id="showinfo" tabindex="-1" role="dialog" 
   aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-header">
            <button type="button" class="close" 
               data-dismiss="modal" aria-hidden="true">
                  &times;
            </button>
            <h4 class="modal-title" id="myModalLabel">
              修改密码
            </h4>
         </div>
          <div>
              <div id='listsp' style="text-align:center">
                  <form class="form-horizontal" role="form" id="tab2">
    <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="text" class="form-control" id="loginname" name="loginname" value="{$Think.session.loginname}" readonly="readonly">
      </div>
   </div>                   
   <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="opassword" name="opassword"
            placeholder="请输入原始密码">
      </div>
   </div>
                         <div class="form-group">
      <label for="firstname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="password" name="password"
            placeholder="请输入新密码">
      </div>
   </div>
   <div class="form-group">
      <label for="lastname" class="col-sm-2 control-label"></label>
      <div class="col-sm-10">
         <input type="password" class="form-control" id="password2" name="password2"
            placeholder="请确认新密码">
      </div>
   </div>

   <div class="form-group">
      <div class="col-sm-offset-2 col-sm-10">
          <br />
         <button type="button" class="btn btn-default" onclick="tjxg()">修改密码</button>
      </div>
   </div>
</form>
              </div>
      </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>          
                <script>             
function showinfo(){

               
                 
  $('#showinfo').modal('show');
  $('#showinfo').modal().css({
    width: '300px',
    height:'300px',
    'margin-left': function () {
       return -($(this).width() / 2);
   }
});
                       }
    function tjxg(){
        var opassword=$('#opassword').val();
        var password=$('#password').val();
        var password2=$('#password2').val();

        if(password === password2){
          $.ajax({
                type: "POST",
                url: "{:U('Index/xgmm')}",
           
                cache: false,
                data: $('#tab2').serialize(),
         
                    success: function(data) {
                switch(data){
                           
                case '0':
                alert('修改成功');
                 window.location.href="{:U('Login/logout')}" ;
                break;
                case '1': 
                 alert('修改失败');
           
                break;
        case '3': 
                 alert('原始密码错误');
           
                break;
            default:
                alert(data);
        }
              
                       }
                    
        
        
        
        });
        }else{
            
            alert("两次输入的密码不一致");
        }
    
}  
function tz(){
    var pages=$('#pages').val();
    window.location.href="__ACTION__/p/"+pages+"";
    
    
}       
                                 
             
</script>

    <script src="__PUBLIC__/lib/bootstrap/js/bootstrap.js"></script>
    <script type="text/javascript">
        $("[rel=tooltip]").tooltip();
        $(function() {
            $('.demo-cancel-click').click(function(){return false;});
        });
    </script>
    
  </body>
</html>
